package com.xpgk.mvc.detailAnnounce;

import java.util.Date;
import java.util.List;

import com.jfinal.aop.Before;
import com.jfinal.log.Log;
import com.jfinal.plugin.activerecord.tx.Tx;
import com.xpgk.annotation.Service;
import com.xpgk.mvc.base.BaseService;

@Service(name = DetailAnnounceUserService.serviceName)
public class DetailAnnounceUserService extends BaseService {

	private static final Log log = Log.getLog(DetailAnnounceUserService.class);

	public static final String serviceName = "detailAnnounceUserService";
	
	
	@Before(Tx.class)
	public boolean save(DetailAnnounceUser detailAnnounceuser) {
		boolean flag =false;
		if(detailAnnounceuser!=null){
			detailAnnounceuser.set(DetailAnnounceUser.column_postDate, new Date());
			flag=detailAnnounceuser.save();
		}
		return flag;
	}


	public List<DetailAnnounceUser> getDetailAnnounce(String cUserIds) {
		String sql = getSqlMy(DetailAnnounceUser.sqlId_findByUserId);
		List<DetailAnnounceUser> list = DetailAnnounceUser.dao.find(sql, cUserIds);
		return list;
	}

	
}
